<template>
  <div class="app-container">
    <list-page-container>
      <template slot="table">
        <el-table @sort-change="handleSortChange" height="100%" v-loading="loading" :data="dataList">
          <el-table-column label="农户姓名" align="center" prop="bxrxm"/>
          <el-table-column label="地块类型" align="center" prop="dklx"/>
          <el-table-column label="地块名称" align="center" prop="dkmc"/>
          <el-table-column label="联系方式" align="center" prop="lxfs"/>
          <el-table-column label="开户行" align="center" prop="nhkhh"/>
          <el-table-column label="保单Id" align="center" prop="orderId"/>
          <el-table-column label="身份证号" align="center" prop="sfzh"/>
          <el-table-column label="银行卡号" align="center" prop="yhkh"/>

          <el-table-column width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-map-location"
                  @click="jumpChitInfoLook(scope.row)"
              >地块位置
              </el-button>
              <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-s-order"
                  @click="jumpChitInfo(scope.row)"
              >种植信息
              </el-button>
              <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-collection"
                  @click="jumpChitInfo(scope.row)"
              >历史保单
              </el-button>
              <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-s-platform"
                  @click="showInfo(scope.row)"
              >采集信息
              </el-button>
            </template>
          </el-table-column>
        </el-table>
      </template>

      <template slot="pageDisplay">
        <pagination
            v-show="total>0"
            :total="total"
            :page.sync="tableQueryParams.pageNum"
            :limit.sync="tableQueryParams.pageSize"
            @pagination="getList"
        />
      </template>
    </list-page-container>

    <el-dialog
        title="采集信息"
        :visible.sync="dialogVisible"
        width="30%"
        @close="closeDialog">
      <div>
        <el-empty description="暂无数据"></el-empty>

      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">关 闭</el-button>
      </span>
    </el-dialog>
  </div>

</template>

<script>
import {listPageMixins} from "@/mixins/listPageMixins";
import ShowFileList from "@/components/ShowFileList/index.vue";
import {queryFarmersFileList} from "@/api/farmersFile";

export default {
  name:'farmersFile',
  mixins: [listPageMixins],
  components: {
    ShowFileList,
  },
  data() {
    return {
      // 查询参数
      queryParams: {
      },
      otherQueryParam: {
      },
      getListFun: queryFarmersFileList,
      dialogVisible: false, //控制弹窗显示
    }
  },
  methods:{
    showInfo(row){
      this.dialogVisible = true;

    },

    closeDialog() {
      this.dialogVisible = false;
    },

    jumpChitInfo(row){
      let {orderId} = row
      this.$router.push({name: 'chitInformation', query: {chitId:orderId}})
    },

    jumpChitInfoLook(row){
      let {orderId} = row
      this.$router.push({name: 'chitInformationLook', query: {chitId:orderId,jumpSign:'farmersFile'}})
    }


  }
}
</script>

<style scoped>

</style>
